package netty.http.xml.codec;

import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.DefaultFullHttpResponse;

import java.util.List;

/**
 * @program JavaBase
 * @description: 客户端解码器
 * @author: zhanglu
 * @create: 2021-10-28 14:10:00
 */
public class HttpClientXmlDecoder extends AbstractHttpXmlDecoder<DefaultFullHttpResponse> {

    @Override
    protected void decode(ChannelHandlerContext channelHandlerContext, DefaultFullHttpResponse response, List<Object> list) throws Exception {
        String result = decode(response);
        HttpXmlResponse xmlResponse = new HttpXmlResponse(response, result);
        list.add(xmlResponse);
    }

}
